package com.mt.api.modules.controller;

import com.mt.common.response.WebResponse;
import com.mt.api.modules.domain.vo.IndexStatDataVo;
import com.mt.api.modules.service.AppIndexService;
import io.swagger.annotations.Api;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: plover
 * @Date: 2020/07/16/1:06 下午
 * @Description:
 */
@RestController
@RequiredArgsConstructor
@Api(tags = "首页")
@RequestMapping("/app/index")
public class AppIndexController {

    private final AppIndexService appIndexService;

    /**
     * 首页数据统计
     *
     * @return
     */
    @GetMapping("/statistics")
    public WebResponse<IndexStatDataVo> getStatistics() {
        return appIndexService.getStatisticsData();
    }

    @GetMapping("/notice")
    public WebResponse getNotice() {
        return appIndexService.getNotice();
    }

}
